﻿using Xunit;
using YAPL.Language.Ast;

namespace YAPL.Test.YAPL.Language.Ast {

	public class ParameterExpressionTest {
		[Fact]
		public void NodeEqualsShouldWorkCorrectly() {
			var param1 = Expressions.Parameter(Expressions.Variable("a"), Expressions.StringLiteral("hello"));
			var param2 = Expressions.Parameter(Expressions.Variable("b"), Expressions.StringLiteral("df"));

			Assert.False(param1.NodeEquals(null));
			Assert.True(param1.NodeEquals(param2));
			Assert.False(param1.NodeEquals(Expressions.StringLiteral("ddd")));
		}
	}
}
